home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / misc / traceroute.txt < prev    next >
Encoding:
Text File  |  2001-07-11  |  4.9 KB  |  198 lines

  1. [exec] Raven: how does traceroute actually work?
  2.  
  3. [exec] is there something in the TCP header or so
  4.  
  5. [Raven] exec, i'll explain
  6.  
  7. [snider] traceroute isnt ovetr TCP
  8.  
  9. [angst] something about a TTL field I know that
  10.  
  11. [Raven] ooh, i can feel a spontaneous lecture coming!
  12.  
  13. (Samcon) snider: strange its probably with the ripper
  14.  
  15. [Raven] is anyone logging this?
  16.  
  17. [angst] I know what it is in my head, just cant type what I want to say :)
  18.  
  19. (Samcon) im
  20.  
  21. [Raven] who else is logging?
  22.  
  23. (Samcon) just a sec
  24.  
  25. [snider] samcon, well it is something with the identification and auth of it
  26.  
  27. (Samcon) im always logging btw
  28.  
  29. [tcs] are u holding a tutorial session ?
  30.  
  31. [Raven] ok, so the topic of this spontaneous lecture is...
  32.  
  33. [Raven] how does traceroute works
  34.  
  35. [Cypher] lecture?
  36.  
  37. [Raven] Cypher, spontaneous
  38.  
  39. [FrEEkY] raven untill phoneabuse.com is working I just refer people to BSRF
  40.  
  41. [snider] yea, although we have explained the matter a million times in here
  42.  
  43. [Raven] ok try to be quiet please
  44.  
  45. [Raven] so anyway, first of all, what is traceroute?
  46.  
  47. [Raven] traceroute traces the route that a packet goes through to get to a certain ip / hostname
  48.  
  49. [Raven] it's especially good to detect network problems
  50.  
  51. [Raven] if you're having trouble connecting to a certain host, you could run traceroute and see where the problem is
  52.  
  53. [Raven] where the chain stops
  54.  
  55. [Raven] any questions so far?
  56.  
  57. [Olaf] there is a great command in widows tracert
  58.  
  59. [Olaf] is it related?
  60.  
  61. [Raven] Olaf, in windows you can type tracert from dos
  62.  
  63. [Raven] in unix/linux, you can type traceroute
  64.  
  65. [Raven] or tracert if you make an alias
  66.  
  67. [Raven] :-)
  68.  
  69. [Olaf] my poor linux
  70.  
  71. [Raven] anyway for windows, there's also www.samspade.org
  72.  
  73. [Raven] ok, we're continuing
  74.  
  75. [Raven] so anyway, this is what traceroute does
  76.  
  77. [Raven] now, how does it work?
  78.  
  79. (Samcon) traceroute is the thing with the packet that gets +1 node every time no ?
  80.  
  81. [Raven] ok, first of all, i have to explain a little about TCP/IP
  82.  
  83. ?» joins [|The_Crow| (*!Itsaia@PTlink-23723.teleweb.pt)]
  84.  
  85. [Raven] TCP/IP packets can be divided into two types
  86.  
  87. [Raven] a) ip packets
  88.  
  89. [Raven] b) icmp packets
  90.  
  91. [Raven] each packet has a header part and a data part
  92.  
  93. ?» nick change [ Cypher » Cypher[awaY] ]
  94.  
  95. [Raven] the header contains info about the sender, the target and any other information that is necessary so the packet would get to it's
  96. destination
  97.  
  98. [Raven] now, icmp packets have a header, and a data
  99.  
  100. [Raven] there are 13 (i think) types of icmp packets
  101.  
  102. [Raven] one of them, for example, is ICMP_ECHO_REQUEST
  103.  
  104. [Raven] which is used for pinging
  105.  
  106. [Raven] however icmp is mainly used for errors
  107.  
  108. [Raven] now, there are ip packets
  109.  
  110. [Raven] ip packets have a header and a data part
  111.  
  112. [Raven] the header contains the source and destination ip
  113.  
  114. [Raven] and a few other values
  115.  
  116. [Raven] like the TTL, for example
  117.  
  118. [Raven] (i'll explain later)
  119.  
  120. [Raven] the data part is either a TCP or a UDP packet
  121.  
  122. [Raven] these two terms are explained in bsrf's tcpip tutorial
  123.  
  124. [Raven] any questions so far?
  125.  
  126. [Raven] no? good.
  127.  
  128. [Raven] ok, so this TTL value serves a great role in killing misrouted packets
  129.  
  130. [Raven] supposed something happens and packets start looping or wandering around the net endlessly
  131.  
  132. [Raven] that'd be a serious waste of bandwidth, right?
  133.  
  134. [Olaf] yes
  135.  
  136. [FrEEkY] mmhmm
  137.  
  138. [Raven] so this is why the ip header contains a TTL value
  139.  
  140. [Raven] and so does the icmp header, i think
  141.  
  142. [Olaf] it decreases
  143.  
  144. [Raven] i don't remember
  145.  
  146. [Raven] anyway this TTL value is decreased whenever a packet goes through a router
  147.  
  148. [Raven] TTL = Time To Live
  149.  
  150. (Samcon) thats what i meant
  151.  
  152. [Raven] whenever a packet goes through a router, the TTL value is decreased by one
  153.  
  154. [angst] ICMP (Internet Control Message Protocol) BTW.... :)
  155.  
  156. [Raven] that way, if a packet goes through too many hops on the way, it gets killed
  157.  
  158. [Raven] and an icmp error is sent back to the sender
  159.  
  160. [Raven] windows 95 sends packets with a TTL value of 32
  161.  
  162. [Raven] i don't know about win 98
  163.  
  164. [Raven] anyway sometimes you'll have to go through more than 32 hops, so you'll get an error and windows will send the packet again
  165. with TTL = 64
  166.  
  167. [Raven] now, here's how traceroute works:
  168.  
  169. [Raven] first of all it sends out a packet with TTL = 1
  170.  
  171. [Raven] the packets goes through the first hop, and dies
  172.  
  173. [Raven] that router sends back an icmp error, and that way we can determine his ip / hostname
  174.  
  175. [Raven] because we can tell who is sending the packet by looking at the icmp header
  176.  
  177. [Raven] then, traceroute sends a packet with TTL = 2
  178.  
  179. [Raven] it travels through the first hop (which we already know) and dies in the second
  180.  
  181. [Raven] we get an error from the second router, thus revealing it's ip
  182.  
  183. [Raven] this goes on until the packet reaches it's destination
  184.  
  185. ?» quits [Olaf (*!----------@194.65.83.PTlink-11626)] (Ping timeout)
  186.  
  187. ?» quits [tcs (*!tcs@204.42.41.PTlink-12468)] (Quit: I'll check the logs...)
  188.  
  189. [Raven] that way, we can tell where our packets go through by getting an error message from each hop
  190.  
  191. [Raven] that's all. that's how traceroute works
  192.  
  193. [Raven] :-)
  194.  
  195. [Raven] end of spontaneous lecture
  196.  
  197. [exec] cool
  198.